An Executable Intermediate Representation for Incremental Global Compilation of Prolog
نویسنده
چکیده
The programming language Prolog has built-in predicates which enable the modiication of a program at runtime. This makes the global compilation of Pro-log programs a complex task. This paper presents an intermediate representation which enables fast incre-mental global compilation of Prolog. This intermediate representation is based on the Vienna Abstract Machine (VAM) with its two versions, the VAM 2P and the VAM 1P. The VAM 2P has two instruction pointers and is well suited for intermediate code interpretation. Since the VAM 1P has only one instruction pointer it can be expanded to machine code. Abstract interpretation can be used to collect information to generate specialized machine code which reduces the code size and allows faster execution. The VAM 2P has been modiied to an abstract machine for abstract interpretation, the VAM AI. This VAM AI is an intermediate representation which can be used to reconstruct the source program, which can be executed for dataaow analysis and which can be translated into VAM 1P instructions and expanded further into machine code for RISC processors.
منابع مشابه
A Progress Report on Incremental Global Compilationof
Traditional native code generating Prolog compilers with global analysis compile programs as a whole and do not support the data base builtin-predicates assert and retract. In this paper we present a scheme to both enable global analysis and incremental compilation. This incremental compiler is based on the Vienna Abstract Machine (VAM). A version of the VAM, the VAM AI , is used as an abstract...
متن کاملDynamic Compilation in the Unix Environment
A system for dynamic compilation under the Unix operating system is described. The basis of the system is an incremental assembler that can be used statically or during program execution to insert or replace a module in an executable image. All cross-module references are via offsets into a run-time symbol table. All generated code is independent of its location or the location of the symbol ta...
متن کاملAnalysis and Compilation of Constraint Solving Algorithms: A Case Study
Constraint Logic Programming is based on the observations that the algorithm of uniica-tion used in Logic Programming is a constraint solving algorithm and that various constraint solving algorithms can work together in a single and powerful framework. Implementations of these algorithms could beneet from the experience gained in implementations of uniication in standard Prolog where global ana...
متن کاملGNU Prolog: Beyond Compiling Prolog to C
We describe in this paper the compilation scheme of the GNU Prolog system. This system is built on our previous experience of compiling Prolog to C in wamcc. The compilation scheme has been however redesigned to overcome drawbacks of the compilation to C. In particular, GNU-Prolog is based on a low-level miniassembly platform-independent language that makes it possible to avoid the phase of com...
متن کاملThe YAIL: An Intermediate Language for the Native Compilation of Prolog Programs
A major goal for any Prolog implementor is to achieve the best performance for applications. Advanced compilation is essential for high performance. The last few years have seen improvements in Prolog compilation technology resulting in a return to the idea of native code execution. We present work on designing a novel native code compiler for Prolog. The compiler uses an intermediate language ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1994